import request from '../utils/request'

/**
 * 发送验证码
 */
export const getCodeApi = (data) => {
  return request.post('/get/code', data)
}

/**
 * 注册用户
 */
export const userAuthenticationApi = (data) => {
  return request.post('/user/authentication', data)
}

/**
 * 登录
 */
export const loginApi = (data) => {
  return request.post('/login', data)
}

/**
 * 账号管理列表
 */
export const authAdminApi = (params) => {
  return request.get('/auth/admin', { params })
}

/**
 * 菜单权限数据tree
 */
export const getUserMenuApi = (params) => {
  return request.get('/user/getmenu', { params })
}
/** 菜单权限修改 */
export const userSetMenuApi = (data) => {
  return request.post('/user/setmenu', data)
}

/** 菜单权限列表 */
export const getMenuListApi = (params) => {
  return request.get('/menu/list', { params })
}

/** 权限下拉列表 */
export const getMenuSelectListApi = (params) => {
  return request.get('/menu/selectlist', { params })
}

/** 用户数据修改 */
export const userUpadateApi = (data) => {
  return request.post('/update/user', data)
}

/** 用户菜单权限 */
export const getMenuPermissionsApi = (params) => {
  return request.get('/menu/permissions', { params })
}

/** 陪护师头像列表 */
export const getPhotoListApi = (params) => {
  return request.get('/photo/list', { params })
}

/** 陪护师创建 */
export const createCompanionApi = (data) => {
  return request.post('/companion', data)
}

/** 陪护列表 */
export const getCompanionListApi = (params) => {
  return request.get('/companion/list', { params })
}

/** 陪护师删除 */
export const companionDeleteApi = (data) => {
  return request.post('/delete/companion', data)
}

/** 订单列表 */
export const adminOrderListApi = (params) => {
  return request.get('/admin/order', { params })
}

/** 服务状态完成 */
export const updateOrderApi = (data) => {
  return request.post('/update/order', data)
}